const routers = [
  {
    path: '/',
    redirect: '/carIndex'
  },
  {
    path: '/carIndex',
    name: 'carIndex',
    meta: {
      title: '用车'
    },
    component: resolve => require(['../views/carIndex.vue'], resolve),
    children: [
      {
        path: 'selectAddress/:address',
        name: 'selectAddress',
        meta: {
          title: '选择地址'
        },
        component: resolve => require(['../views/selectAddress.vue'], resolve)
      },
      {
        path: 'carType',
        name: 'carType',
        meta: {
          title: '选择车型'
        },
        component: resolve => require(['../views/carType.vue'], resolve)
      },
      {
        path: 'carDetail',
        name: 'carDetail',
        component: resolve => require(['../views/carDetail.vue'], resolve)
      },
      {
        path: 'orderError/:orderId',
        name: 'orderError',
        component: resolve => require(['../views/orderError.vue'], resolve)
      },
      {
        path: 'waitCar/:orderId',
        name: 'waitCar',
        meta: {
          title: '等待接单'
        },
        component: resolve => require(['../views/waitCar.vue'], resolve)
      },
      {
        path: 'waitApplyOrder',
        name: 'waitApplyOrder',
        meta: {
          title: '待付款订单'
        },
        component: resolve => require(['../views/waitApplyOrder.vue'], resolve)
      },
      {
        path: 'orderDetail/:orderId',
        name: 'orderDetail',
        meta: {
          title: '订单详情'
        },
        component: resolve => require(['../views/orderDetail.vue'], resolve)
      },
      {
        path: 'waitTask',
        name: 'waitTask',
        meta: {
          title: '待办任务'
        },
        component: resolve => require(['../views/waitTask.vue'], resolve)
      },
      {
        path: 'travelAndBus',
        name: 'travelAndBus',
        component: resolve => require(['../views/travelAndBus.vue'], resolve)
      },
      {
        path: 'applyInfo',
        name: 'applyInfo',
        component: resolve => require(['../views/applyInfo.vue'], resolve)
      }
    ]
  }];
export default routers;
